import { HashRouter as Router, Route, NavLink, Switch, Redirect } from 'react-router-dom';
import React from 'react'
import List from './List';
import SelectNav from './SelectNav';

const kind = (props) => {
    // console.log(props)
    return (
        <List kind={props.match.params.kind} money={props.match.params.money } />
    )
}

class Select extends React.Component {
    render() {
        return (
            <Router>
                <SelectNav />
                <div style={{height:"20px"}}></div>
                <Switch>
                    <Route path="/all/:kind&:money" component={kind} />
                    <Redirect from='/all' to='/all/所有&所有' />
                    {/* <Route render={() => <Redirect to='/all/所有&所有' />} /> */}
                </Switch>
            </Router>
        )
    }

}

export default Select;